<template>
  <div class="app-container">
    <el-button @click="getParamRequest">get参数请求</el-button>
    <el-button @click="postParamRequest">post参数请求</el-button>
    <el-button @click="postJsonRequest">post JSON请求</el-button>
  </div>
</template>

<script>
import encryptor from '@/utils/encrypt'
import { requestMethod1, requestMethod2, requestMethod3 } from '@/api/system/productManage'

export default {
  name: 'index',
  data() {
    return {}
  },
  created() {
    // let message = '123'
    // let cipherText = encryptor.encrypt(message)
    // console.log(cipherText)
    // console.log(encryptor.decrypt(cipherText))
  },
  methods: {
    getParamRequest() {
      requestMethod1({ userId: '123', deptId: '456' }).then(response => {
        this.$message.success('请求成功')
      })
    },

    postParamRequest() {
      requestMethod2({ userId: '123', deptId: '456' }).then(response => {
        this.$message.success('请求成功')
      })
    },

    postJsonRequest() {
      requestMethod3({ userId: '123', deptId: '456' }).then(response => {
        this.$message.success('请求成功')
      })
    }
  }
}
</script>

<style scoped>
.demo-table-expand {
  font-size: 0;
}

.demo-table-expand label {
  width: 90px;
  color: #99a9bf;
}

.demo-table-expand .el-form-item {
  margin-right: 0;
  margin-bottom: 0;
  width: 50%;
}
</style>
